5f8edbf6063ec326b2e4b2e25d77603f2ac4f5ca,VUE2/src/tufts/vue/LinkToolPanel.java,LinkToolPanel,buildBox,#,141

Before Change


        
        float[] strokeValues = VueResources.getFloatArray("strokeWeightValues");
        String[] strokeMenuLabels = VueResources.getStringArray("strokeWeightNames");
        mStrokeButton = new StrokeMenuButton(strokeValues, strokeMenuLabels, true, false);
        mStrokeButton.setPropertyKey(LWKey.StrokeWidth);
        //mStrokeButton.setButtonIcon(new LineIcon(16,16));
        mStrokeButton.setStroke(1f);
        mStrokeButton.setToolTipText("Stroke Width");
        mStrokeButton.addPropertyChangeListener(this);
        
    	//-------------------------------------------------------
        // Stroke Style menu
        //-------------------------------------------------------
        
        mStrokeStyleButton = new StrokeStyleButton();
        mStrokeStyleButton.setPropertyKey(LWKey.StrokeStyle);
        mStrokeStyleButton.addPropertyChangeListener(this);
        
        
        final Action[] LinkTypeActions = new Action[] { 

After Change


        
        float[] strokeValues = VueResources.getFloatArray("strokeWeightValues");
        String[] strokeMenuLabels = VueResources.getStringArray("strokeWeightNames");
        mStrokeButton = new StrokeMenuButton(strokeValues, strokeMenuLabels, true, false);
        mStrokeButton.setPropertyKey(LWKey.StrokeWidth);
        //mStrokeButton.setButtonIcon(new LineIcon(16,16));
        mStrokeButton.setToolTipText("Stroke Width");
        //mStrokeButton.addPropertyChangeListener(this);
        
    	//-------------------------------------------------------
        // Stroke Style menu
        //-------------------------------------------------------
        
        mStrokeStyleButton = new StrokeStyleButton();
        mStrokeStyleButton.setPropertyKey(LWKey.StrokeStyle);
        //mStrokeStyleButton.addPropertyChangeListener(this);
        
        
        final Action[] LinkTypeActions = new Action[] { 
            Actions.LinkMakeStraight,
            Actions.LinkMakeQuadCurved,
            Actions.LinkMakeCubicCurved
        };
        
        Integer[] i = new Integer[4];
		i[0]= new Integer(0);
		i[1]= new Integer(1);
		i[2]= new Integer(2);
		i[3]= new Integer(3);
		
        AbstractButton linkTypeMenu = new VuePopupMenu(LWKey.LinkCurves, LinkTypeActions);
        linkTypeMenu.setToolTipText("Link Style");
        //linkTypeMenu.addPropertyChangeListener(this);
        
        //LWCToolPanel.InstallHandler(mArrowStartButton, arrowPropertyHandler);
        //LWCToolPanel.InstallHandler(mArrowEndButton, arrowPropertyHandler);

        // We can't just rely on the each handler hanging free without knowing about it.
        // It works when the editor activates -- we can find which tool panel it's in
        // (up the AWT chain), and could find the right default state to work with
        // (node/link/text, etc).  But when a selection happens and the tool panel needs
        // to LOAD UP all these property editors, this is the only way we can know about
        // it...  Otherwise, we'd have to make every LWPropertyHandler a selection
        // listener in it's own right (tho this wouldn't be instance, given that every
        // single action in the system is also a selection listener!)
        
        //super.addEditor(arrowPropertyHandler);

        //mArrowStartButton.addActionListener(arrowPropertyHandler);
        //mArrowEndButton.addActionListener(arrowPropertyHandler);
        //mArrowStartButton.addItemListener(arrowPropertyHandler);
        //mArrowEndButton.addItemListener(arrowPropertyHandler);

        //mArrowStartButton.addItemListener(arrowPropertyHandler);
        //mArrowEndButton.addItemListener(arrowPropertyHandler);
        GridBagConstraints gbc = new GridBagConstraints();
        
        //addComponent(linkTypeMenu);
        	
        mBox.setLayout(new GridBagLayout());
    	
        gbc.insets = new Insets(1,3,1,1);
		gbc.gridx = 0;
		gbc.gridy = 0;    				
		gbc.gridwidth=1;
		gbc.fill = GridBagConstraints.VERTICAL; // the label never grows
		gbc.anchor = GridBagConstraints.EAST;
		JLabel strokeLabel = new JLabel("Stroke :");
		strokeLabel.setLabelFor(mStrokeStyleButton);
		strokeLabel.setForeground(new Color(51,51,51));
		strokeLabel.setFont(tufts.vue.VueConstants.SmallFont);
		mBox.add(strokeLabel,gbc);